package mode.compositeMode10;

/***
 * 组合模式
 *
 * @link https://zhuanlan.zhihu.com/p/169844846
 *
 */
public class CompositePatternDemo {

    public static void main(String[] args) {

        Organization hq = new Headquarters();

        Department fnc = new FinanceDepartment();

        Department hr = new HumanResourceDepartment();

        hq.addOrg(fnc);
        hq.addOrg(hr);


        System.out.println("------组织架构-------");

        hq.showOrg();

        System.out.println("----部门职务---");
        hq.displayDuty();


    }

}
